1. Field of the Invention
The instant invention relates to a filter for filtering baseline wander from an ECG signal and more specifically to a linear phase high pass digital filter for filtering baseline wander from an ECG signal.
2. Description of Related Art
ECG traces are produced by detecting electrical impulses present in the heart and converting these electrical signals into a visually discernible form such as a trace written by a pen on a moving paper or a trace displayed on a video display screen. The electrical signals of the heart are detected by placing electrodes on the skin of the patient which electrodes are sensitive to the electrical potentials generated by the heart as the heart goes through its beating cycle. The potentials generated by the heart are usually quite small. These heart generated potentials detected by the electrodes have typical amplitudes of only a few millivolts so that any stray electrical potentials can either mask the heart-generated potentials or shift them. This masking or shifting makes proper analysis of the ECG signal difficult or impossible.
One particular kind of extraneous electrical potential is caused by electrode-skin interaction. This interaction occurs where acids naturally present in the skin react with metals in the electrode in an electrolytic reaction which causes an effective "battery" to be formed. This "battery" provides a relatively constant long term or D.C. signal which varies only slightly over time. This particular phenomena is known in the art as "baseline wander". An example of an ECG signal having baseline wander is shown in FIG. 1.
Four general groups of solutions have been devised to deal with the baseline wander problem. First, special electrodes are used made of silver or silver chloride. These electrodes are less reactive to the acids in the skin than other types of electrodes and therefore minimize the electrolytic reaction with the resulting unwanted electrical potentials.
Another solution to the baseline wander problem is to abrasively remove the top layer of skin. This top layer produces the acids which ultimately produce the electrolytic reaction with the electrodes. Removal of the top layer of skin is typically done by using an electrode having an abrasive surface which surface abrades the top layer of skin. Thereafter, the electrode is ground into the skin. Because the top layer of skin is essentially removed, the amount of acid present to react with the electrode to cause the electrolytic reaction is reduced.
Another solution to the baseline wander problem is to convert the ECG signal to a digital signal and then estimate the baseline wander of the ECG signal on a computing device by creating a cubic spline which passes through the P-R segment of every beat. The cubic spline is then used to determine an offset to be added to the ECG signal to cancel the baseline wander. The P-R segment of each beat must be identified in real time by the computing device. The disadvantage of the cubic spline method is that if the P-R segment is not correctly identified, the method will fail and may cause even more baseline distortion than was originally present.
Finally, the last group of solutions dealing with the baseline wander problem is to use a high pass filter to remove the slowly varying signals such as those created by the electrolytic reaction manifested as baseline wander. Ideally, these filters pass all frequencies above about 0.5 Hertz, since baseline wander typically occurs with frequencies below this frequency and the energy in the ECG signal is mostly above this frequency.
In the simplest form, a single pole high pass filter is used, such as that shown schematically in FIG. 2, comprising a capacitor connected between the input and the output of the filter and a resistor located on the output side of the capacitor biasing the capacitor to ground.
As is well known in the art, any complex signal can be represented as the combination of sinusoidal signals at varying frequencies and amplitudes. The series of sinusoidal signals is called a Fourier series. If a single pole high pass filter is used to create a -3 dB cutoff frequency of 0.5 Hertz, as is shown in the graph of FIG. 3A, the corresponding inherent phase shift of the frequencies of the input signal passed through the filter is severely shifted for frequencies above the cutoff frequency as shown in FIG. 3B. The phase shift inherent in a single pole filter manifests itself in a delay in the passage of Fourier series component frequencies of the ECG signal through the filter. The delay is defined as the negative of the rate of phase change divided by the frequency of interest. The amount of delay in such single pole high pass filters varies depending on the frequency of the component parts passed through the filter as shown in FIG. 3C. These delays of varying amounts depending on the frequency of the ECG signal passed through the high pass filter cause the shape of the entire ECG signal to become distorted which distortion hinders analysis of the ECG signal.
The most severe problem with single pole high pass filters with a cutoff frequency of about 0.5 Hz, whether analog or digital, is that the single pole filter inherently depresses the ST segment of the ECG signal. However, the ST segment is diagnostically significant. If this segment is distorted, the doctor will have difficulty in correctly analyzing the ECG signal.
In order to avoid this severe phase shift with its attendant distortion of the ECG signal and depression of the ST segment, the typical single pole filter used as a baseline wander filter has its cutoff frequency moved from about 0.5 Hertz down to about 0.05 Hertz as shown in FIG. 4A. When the cutoff frequency of the filter is moved to about 0.05 Hz, the phase shift of the ECG signal for frequencies above about 0.5 Hz approaches zero as shown in FIG. 4B. The corresponding delay for the ECG signal approaches zero above about 0.5 Hz as shown in FIG. 4C. In this case, the severe phase shift which occurs at about the cutoff frequency, that is around 0.05 Hz, does not affect any frequency components of the ECG signal which occur at higher frequencies than 0.5 Hz. Because the ECG signal has virtually no frequency components below about 0.5 Hz, the amount of distortion of the ECG signal by the filter is minimized.
The problem with using a filter having a cutoff frequency of about 0.05 Hz is that baseline wander often occurs at frequencies above 0.05 Hertz, particularly in the range of 0.05 Hz to 0.5 Hz, so that a single pole filter with a cutoff frequency of 0.05 Hz is not as effective of a filter of these baseline wander signals as is desired. These single pole filters may be implemented as analog or digital filters as is well understood in the art.
More complicated filters having a plurality of poles and zeros could be used to create a baseline wander filter having a cutoff frequency of about 0.5 Hz and a near constant delay for the ECG signal passed through the filter in order to reduce distortion caused by the filtering of the ECG signal. A problem with such filters is that their increased complexity leads to increased size and cost of the filter. Another problem with such filters is that they typically have increased power consumption compared to simpler filters. These problems with such filters are to be avoided if possible
As stated above, filters, such as single pole filters, have been implemented as analog or digital filters. In an attempt to reduce the complexity and resulting costs of filters, particularly baseline wander filters, and also in an attempt to increase the filtering capabilities to more closely approximate the ideal desired filter, digital filtering systems have become the preferred mode of filtering for most signal processing applications such as ECG signal applications. Digital systems allow innovative filter designs to be used based on mathematical techniques. Mathematical filtering techniques are ideally suited to be implemented on a digital system.
One approach to creating these digital filtering systems could be to transform the input ECG signals into a Fourier series corresponding to the input signal. As stated above, a series of sinusoidally varying signals will result at various frequencies with each sine wave having various amplitudes and phases. In the digital filter to remove the baseline wander, the components of the Fourier series having frequencies equal to or higher than the heart beat frequency are passed through the filter. The Fourier series components with slowly varying frequencies, such as those produced by the baseline wander, are removed. In such a filter, it would be highly desirable to build a high pass digital filter with a cutoff frequency of 0.5 Hertz which has a roughly constant delay for all frequencies passed through the filter. A problem with such Fourier transform filters is that it is difficult to perform the required mathematical calculations in real time.
Another approach to providing a digital filter to filter baseline wander has been to use finite impulse response (FIR) filters to filter baseline ECG signals. In the FIR filters, the influence of an input signal on the output of the filter has a finite lifetime, hence the name. Typically, the input ECG signal is sequentially delayed by a series of unit delays. After each delay, the delayed signal is multiplied by a coefficient corresponding to the unit delay. The resulting values from each multiplication operation ar added together to produce the FIR filter output.
The problem with using FIR filters as baseline filters is that they require large numbers of computations to implement the filter. The reasons for the large number of computations is that the number of coefficients required to implement the FIR filter is approximately equal to the inverse of the cutoff frequency of the filter multiplied by the sample rate of the data points presented to the filter. In a typical ECG system, the sample rate is 500 samples per second and the desired cutoff frequency is 0.5 Hz. The number of coefficients needed to implement the corresponding FIR filter would be approximately 1000 coefficients. For each of the 1000 coefficients, there would be a corresponding unit delay so 1000 unit delays would be required to implement the filter. In operation, every part of the ECG signal delayed by the 1000 unit delays would have to be multiplied by its corresponding coefficient and then the resulting values would have to be added together for each sample cycle to produce the output of the FIR filter. If the baseline filtering is to take place in real time using an FIR filter, the filter must be implemented on a powerful computing system. Such systems are typically complex and comparatively expensive.